package com.itcam;

import java.util.Scanner;

/**
 * @author : Cammy.Wu
 * Description : 
 */

public class Demo01 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.println("请输入数字A：");
        String A = scanner.nextLine();
        System.out.println("请选择运算符（+、-、*、/）");
        String O = scanner.nextLine();
        System.out.println("请输入数字B：");
        String B = scanner.nextLine();
        double E = 0d;

        if (O.equals("+")) {
            E = Double.parseDouble(A) + Double.parseDouble(B);
        }
        if (O.equals("-")) {
            E = Double.parseDouble(A) - Double.parseDouble(B);
        }
        if (O.equals("*")) {
            E = Double.parseDouble(A) * Double.parseDouble(B);
        }
        if (O.equals("/")) {
            E = Double.parseDouble(A) / Double.parseDouble(B);
        }
    }
}
